import "./assets/main.css";

import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
const app = createApp(App);
app.use(router);

// elui
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
app.use(ElementPlus);
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

//bootstrap
import 'bootstrap'
import 'bootstrap/dist/css/bootstrap.min.css'

//
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

import Prism from 'prismjs';

VueMarkdownEditor.use(vuepressTheme, {
  Prism,
});
app.use(VueMarkdownEditor);

// axios
import axios from "axios";
const req = axios.create({
  baseURL: "http://localhost:56801/api",
  timeout: 1000,
})
app.config.globalProperties.$axios = req;

app.mount("#app");
